/*
package itHsuSE.demo2;

public class MethodExer02 {
    public static void main(String[] args) {
        */
/*int[][] arr={
                {1,2,3},
                {4,5,6},
                {7,8,9}
        };
        MyTools myTools=new MyTools();
        myTools.print(arr);*//*

        Person p=new Person();
        p.name="Hsu";
        p.age=189;
        Person p2=p.copyPerson(p);
        System.out.println(p);
        System.out.println(p2);
        System.out.println(p.name+" "+p.age);
        System.out.println(p2.name+" "+p2.age);
    }
}

class MyTools{
    public void print(int[][] arr){
        for (int i = 0; i < arr.length; i++) {
            for (int j = 0; j < arr[0].length; j++) {
                System.out.print(arr[i][j]+" ");
            }
            System.out.println();
        }
    }
}

class Person{
    String name;
    int age;

    public Person copyPerson(Person p){
        Person p2=new Person();
        p2.name=p.name;
        p2.age=p.age;
        return p2;
    }
}*/
